'use strict';

const { Controller } = require('ee-core');
const Log = require('ee-core/log');
const Services = require('ee-core/services');


class SystemController extends Controller{

    constructor(ctx) {
        super(ctx);
    }
	
	/**
	 * 关机
	 */
	shutdown() {
		Services.get('system').shutdown();
	}
	
	/**
	 * 重启
	 */
	reboot() {
		Services.get('system').reboot();
	}
	
	/**
	 * 获取音量
	 */
	getSound() {
		return Services.get('system').getSound();
	}
	
	/**
	 * 设置音量
	 */
	setSound(soundVal = 80) {
		Services.get('system').setSound(soundVal);
	}



}


SystemController.toString = () => '[class SystemController]';
module.exports = SystemController;